<?php

use Biz\service\trade\Logistics as sLogistics;
use Doraemon\tools\ActionLog;

class LogisticsAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REGISTER;

    public function main()
    {
        $orderNo = $this->getRequest()->getQuery('order_no', '');
        $packageId = $this->getRequest()->getQuery('package_id', '0');


        ActionLog::log($this->uid, ['order_id' => $orderNo], ActionLog::BIZ_ORDER_LOGISTICS);

        $logisticsInfo = sLogistics::orderTrack($this->uid,$orderNo, $packageId);

        $this->setSuccess($logisticsInfo);

    }
}